package com.eduplatform.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("user")
public class User implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String username;

    private String password;

    private String nickname;

    private String avatar;

    private String email;

    private String phone;

    private Integer role; // 0: student, 1: teacher, 2: admin

    private Long schoolId; // 关联的学校ID，教师必填

    private Integer educationLevel; // 教育阶段：1-小学，2-初中，3-高中，4-大学

    private Date createTime;

    private Date updateTime;

    @TableLogic
    private Integer isDeleted;
}